package com.ghl.springbootmysqlmasterslave.annotation;

import com.ghl.springbootmysqlmasterslave.datasource.DBTypeEnum;
import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface DataSource {

    @AliasFor("dataSource")
    DBTypeEnum value() default DBTypeEnum.MASTER;

    DBTypeEnum dataSource() default DBTypeEnum.MASTER;

}